﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetDon.OA.Interface.eLogistics
{
    [Serializable]
    public class RevenueMachineAccountInvoiceData : eLogiticsDomainObject
    {
        public Guid Id { get; set; }
        public Guid? AreaId { get; set; }
        public Guid? CustomerId { get; set; }
        public string CustomerName { get; set; }
        public Guid? RouteTypeId { get; set; }


        public string ExpenseDescription { get; set; }

        public string InvoiceNO { get; set; }
        public Guid? InvoiceType { get; set; }
        public Guid? InvoiceCurrencyType { get; set; }
        public decimal? StateofAccountAmount { get; set; }
        public decimal? InvoiceAmount { get; set; }

        public string InvoiceDescription { get; set; }


        public DateTime? ConfirmInvoiceDate { get; set; }
        public DateTime? AccountsReceivableDate { get; set; }

        public string AccountReceiptExceptions { get; set; }
        public bool? IsAccountReceiptExceptions { get; set; }
        public string AccountReceiptComments { get; set; }
        public decimal? TotalAccountReceiptAmount { get; set; }
        public decimal? UnReceivedAmount { get; set; }
        public DateTime? ConfirmAccountsReceivableDate { get; set; }

        public IList<RevenueMachineAccountInvoiceOrderData> RevenueMachineAccountInvoiceOrders { get; set; }
        public IList<RevenueMachineAccountInvoiceReceiptData> RevenueMachineAccountInvoiceReceipts { get; set; }

        public bool IsAccountReceiptCompleted { get; set; }
        public bool IsInvoiceCompleted
        {
            get { return !UnReceivedAmount.HasValue || UnReceivedAmount.Value <= 0; }
            private set { }
        }
    }
    [Serializable]
    public class RevenueMachineAccountInvoiceOrderData : eLogiticsDomainObject
    {
        public Guid Id { get; set; }
        public Guid? AreaId { get; set; }
        public string OrderCode { get; set; }
        public Guid? RevenueMachineAccountId { get; set; }
        public Guid? RevenueMachineAccountInvoiceId { get; set; }
        public bool IsAccountReceiptCompleted { get; set; }

    }

    [Serializable]
    public class RevenueMachineAccountInvoiceReceiptData : eLogiticsDomainObject
    {
        public Guid Id { get; set; }
        public Guid? AreaId { get; set; }

        public Guid? RevenueMachineAccountInvoiceId { get; set; }

        public string BankNoteNO { get; set; }
        public Guid? CurrencyType { get; set; }
        public decimal? AccountsReceiptAmount { get; set; }
        public Guid? AccountsReceiptType { get; set; }
        public DateTime? ConfirmAccountsReceiptDate { get; set; }
        public DateTime? BillOfExchangeDueDate { get; set; }
        public string Comments { get; set; }

    }
}
